package org.huzhp.data.core;

/**
 * @Description: 数据库信息
 * @Author: huzp
 * @CreateDate: 2020/4/22 10:09
 * @Version: 1.0
 */
public class DbInfo {

    /**
     * id 唯一标识
     */
    private final String id;

    /**
     * 数据库类型
     */
    private final String type;

    /**
     * 数据库ip
     */
    private final String ip;

    /**
     * 数据库端口
     */
    private final Integer port;

    /**
     * 数据库模式
     */
    private final String schema;

    /**
     * 数据库名称
     */
    private final String name;

    /**
     * 用户
     */
    private final String username;

    /**
     * 密码
     */
    private final String password;

    /**
     * jdbc连接url
     */
    private final String jdbcUrl;

    public DbInfo(DbInfoBuilder builder) {
        this.id = builder.getId();
        this.type = builder.getType();
        this.ip = builder.getIp();
        this.port = builder.getPort();
        this.schema = builder.getSchema();
        this.name = builder.getName();
        this.username = builder.getUsername();
        this.password = builder.getPassword();
        this.jdbcUrl = builder.getJdbcUrl();
    }


    public String getId() {
        return id;
    }

    public String getType() {
        return type;
    }

    public String getIp() {
        return ip;
    }

    public Integer getPort() {
        return port;
    }

    public String getSchema() {
        return schema;
    }

    public String getName() {
        return name;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    public String getJdbcUrl() {
        return jdbcUrl;
    }
}
